# Maintainer: Christian Hesse <mail@eworm.de>
# Contributor: "Amhairghin" Oscar Garcia Amor
# Contributors: bhushan, huma, adlaiff6, Invie, solarce

pkgname=tmate
pkgver=2.4.0
pkgrel=3
pkgdesc='Instant terminal sharing'
arch=('loong64' 'x86_64')
url='https://tmate.io/'
license=('BSD')
depends=('libevent' 'libssh' 'libutempter' 'msgpack-c' 'ncurses')
makedepends=('cmake' 'ruby')
source=("https://github.com/tmate-io/${pkgname}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('62b61eb12ab394012c861f6b48ba0bc04ac8765abca13bdde5a4d9105cb16138')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./autogen.sh
  ./configure \
    --prefix=/usr
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make DESTDIR="${pkgdir}" install

  install -D -m0644 COPYING "${pkgdir}"/usr/share/licenses/tmate/COPYING
}
